package com.bicon.botu.core.base.common;

/**
 * 系统常量
 */
public interface Constants {

    /**
     * 错误标识
     */
    String ERROR = "error";

    /**
     * 失败标识
     */
    String FAILURE = "failure";

    /**
     * 成功标识
     */
    String SUCCESS = "success";

    /**
     * 真标识
     */
    String TRUE = "true";

    /**
     * 假标识
     */
    String FLASE = "flase";

    /**
     * mq已发送
     */
    String MQ_SEND_SUCCESSFUL = "0";

    /**
     * 逻辑删除 正常
     */
    String DEL_LOGIC_NORMAL = "0";
    /**
     * 逻辑删除 已删除
     */
    String DEL_LOGIC_DELETE = "1";

    /**
     * 正常
     */
    int RESPONSE_CODE_200 = 200;
    /**
     * 参数错误
     */
    int RESPONSE_CODE_400 = 400;

    int RESPONSE_CODE_404 = 404;

    int RESPONSE_CODE_405 = 405;

    int RESPONSE_CODE_401 = 401;

    int RESPONSE_CODE_403 = 403;
    /**
     * 服务器未知错误
     */
    int RESPONSE_CODE_500 = 500;

    String RESPONSE_MESSAGE_200 = "success";

    String RESPONSE_MESSAGE_400 = "parameter error";

    String RESPONSE_MESSAGE_404 = "resource not found";

    String RESPONSE_MESSAGE_405 = "No resource method found for POST";

    String RESPONSE_MESSAGE_401 = "params error";

    String RESPONSE_MESSAGE_500 = "server error";

    /**
     * 数据库错误
     */
    int RESPONSE_CODE_600 = 600;

    String RESPONSE_MESSAGE_600 = "数据库操作过程错误";

    int RESPONSE_CODE_601 = 601;

    String RESPONSE_MESSAGE_601 = "数据库记录已存在";

    int RESPONSE_CODE_602 = 602;

    int RESPONSE_CODE_603 = 603;

    String RESPONSE_MESSAGE_602 = "操作的记录不存在";

    String RESPONSE_MESSAGE_603 = "被扫描的对象不存在";

    /**
     * 登录提示
     */
    int RESPONSE_CODE_300 = 300;

    String RESPONSE_MESSAGE_300 = "请先登录";
    /**
     * 用户信息不存在
     */
    int RESPONSE_CODE_301 = 301;

    String RESPONSE_MESSAGE_301 = "用户信息不存在";

    /**
     * 用户权限
     */
    int RESPONSE_CODE_302 = 302;

    String RESPONSE_MESSAGE_302 = "权限不足";


    String RESULT_JSON_DATA_OBJECT = "object";        //表示data返回单个对象
    String RESULT_JSON_DATA_COLLECTION = "collection";    //表示data返回集合对象

    /**
     * 操作：增、删、该、查
     */
    String OPERATION_ADD = "ADD";
    String OPERATION_DELETE = "DELETE";
    String OPERATION_UPDATE = "UPDATE";
    String OPERATION_SELECT = "SELECT";

    /******************************* 存放用户基本信息 *******************************/
    String BOTU_USER_USER_INFO = "botu:user:userInfo:";

    /******************************* 存放账户信息 *******************************/
    String BUTO_USER_ACCOUNT = "botu:user:account:";

    /******************************* 用户token缓存 *******************************/
    String BOTU_USER_TOKEN = "botu:user:token:";

    /******************************* 后台用户token缓存 *******************************/
    String BOTU_USER_WEB_TOKEN = "botu:user:web:token:";

    /******************************* 用户id列表缓存 *******************************/
    String BOTU_USER_USERIDS = "botu:user:userids:";

    /******************************* 激励任务缓存 *******************************/
    String BOTU_ENCOURAGE_TASK ="botu:encourage:task:";
    String BOTU_ENCOURAGE_TASK_KEY ="encourage_task:";

    /********************************** 钱包余额缓存 ***************************************/
    String BOTU_WALLET_BALANCE ="botu:wallet:balance:";

    /**
     * 账号角色-当前为能访问的服务
     */
    String ACCOUNT_ROLE = "botu:account:role:";

    /**
     * 角色-资源
     */
    String ROLE_RESOURCES = "botu:role:resources:";

    /**
     * ################定义配置分页常量#####################
     */
    String PAGE_RESULT_LIST = "list";// 数据集合，符合查询条件的所有记录数据

    String PAGE_TOTAL_NUM = "count";// 总记录数

    String PAGE_TOTAL_PAGE = "totalPage";// 总页数

    String PAGE_NUM = "pageNo";// 当前页码

    String PAGE_SIZE = "pageSize";// 每页显示数量

    /**
     * 存放注册过的服务前缀
     */
    String REDIS_SERVICES_LIST_PRFIX = "lk:services:";
    /**
     * 存放注册过的服务key
     */
    String REDIS_SERVICES_LIST_KEY = "list";

    /**
     * 项目缓存key
     */
    String BOTU = "botu";

    /**
     * reids key 分隔符
     */
    String REDIS_KEY_DELIMITER = ":";
    /**
     * token失效时间
     */
    int TOKEN_EXPIRE_TIME = 55;

    /**
     * token超时时间
     */
    Long TOKEN_TIME_OUT = 3600L;


    /********************************** 需要获取积分的url缓存key ***************************************/
    String BOTU_INTEGRAL_MODEL_URL ="botu:integral:model:url";
}
